Skip to content

fix: add mobile hamburger menu to header#357

Open
mohanakatari119-bit wants to merge 4 commits intoopen-telemetry:mainfrom
mohanakatari119-bit:fix/mobile-nav-hamburger
Open

fix: add mobile hamburger menu to header#357
mohanakatari119-bit wants to merge 4 commits intoopen-telemetry:mainfrom
mohanakatari119-bit:fix/mobile-nav-hamburger

Conversation

@mohanakatari119-bit
Copy link
Copy Markdown
Contributor

@mohanakatari119-bit mohanakatari119-bit commented May 5, 2026

The header navigation was only visible on md and above breakpoints (hidden ... md:flex). On mobile there was no fallback, so the nav links were completely inaccessible to anyone on a phone or narrow viewport.

This adds a hamburger toggle button that is visible only below the md breakpoint. Clicking it slides open a vertical nav panel with the same links. The icon swaps between Menu and X (from lucide-react, already a dependency). The panel closes automatically when a link is tapped so the user lands on the new page without having to dismiss the menu manually.

Both the toggle button and the nav panels carry appropriate aria-label, aria-expanded, and aria-controls attributes. The desktop <nav> now also has aria-label="Main" which was missing.

Three new test cases cover: hamburger button presence, open/close toggle state, and auto-close on link click.

demo

Open Closed

Signed-off-by: mohanakatari119-bit <mohana.katari119@gmail.com>
@mohanakatari119-bit mohanakatari119-bit requested review from a team as code owners May 5, 2026 17:12
@netlify
Copy link
Copy Markdown

netlify Bot commented May 5, 2026

Deploy Preview for otel-ecosystem-explorer ready!

Name Link
🔨 Latest commit f8afac7
🔍 Latest deploy log https://app.netlify.com/projects/otel-ecosystem-explorer/deploys/69fb09fde542590009b49f5a
😎 Deploy Preview https://deploy-preview-357--otel-ecosystem-explorer.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla Bot commented May 5, 2026

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: mohanakatari119-bit / name: Mohana Katari (f8afac7, fabb724)
  • ✅ login: mohanakatari119-bit / name: mohanakatari119-bit (09f6fc8, 4a7b1a5)

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a mobile navigation fallback to the shared Header so the primary site links remain reachable below the md breakpoint. It fits into the app shell by extending the persistent top-level header component and updating its tests.

Changes:

  • Added a mobile hamburger toggle to Header, with conditional mobile nav rendering and ARIA attributes.
  • Kept the existing desktop navigation and added labels for navigation landmarks.
  • Expanded Header tests to cover the new toggle button, open/close state, and menu-closing behavior on link click.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
ecosystem-explorer/src/components/layout/header.tsx Adds menu state, mobile toggle button, and conditional mobile nav to the fixed app header.
ecosystem-explorer/src/components/layout/header.test.tsx Adds interaction tests for the new mobile menu behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread ecosystem-explorer/src/components/layout/header.tsx Outdated
Comment thread ecosystem-explorer/src/components/layout/header.tsx Outdated
Copy link
Copy Markdown
Member

@jaydeluca jaydeluca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great contribution @mohanakatari119-bit thank you for addressing this!

The two comments from copilot are valid, i confirmed the menu stays open when you navigate without pressing a button in the opened menu, so that would be good to address. The second comment about having a unified nav-item definition would be a nice improvement too if you wouldn't mind looking into that.

Thanks again!

@mohanakatari119-bit
Copy link
Copy Markdown
Contributor Author

great contribution @mohanakatari119-bit thank you for addressing this!

The two comments from copilot are valid, i confirmed the menu stays open when you navigate without pressing a button in the opened menu, so that would be good to address. The second comment about having a unified nav-item definition would be a nice improvement too if you wouldn't mind looking into that.

Thanks again!

thanks :)
i will start working on the copilot suggestions

@mohanakatari119-bit mohanakatari119-bit force-pushed the fix/mobile-nav-hamburger branch from 49dc1a1 to 4a7b1a5 Compare May 6, 2026 08:39
@mohanakatari119-bit
Copy link
Copy Markdown
Contributor Author

@jaydeluca hey i just fixed the suggestions, can u review it : )

Copy link
Copy Markdown
Member

@vitorvasc vitorvasc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Thanks for the contribution 🙌🏼

Two minor tweaks that could improve the experience:

  • The menu currently stays open even when clicking outside of it
  • We could add an opaque backdrop behind the menu t keep the focus on the navigation while it's open. This would also make it easier to handle the "click outside" behavior from the previous item

Let me know what you think :)

@mohanakatari119-bit
Copy link
Copy Markdown
Contributor Author

hey @vitorvasc, both make sense! the backdrop especially would make the close-on-outside-click much cleaner to handle. i'll work on both together since they pair well. will push an update soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants